import axios from 'axios';


// 获取退款列表
export const getRefundList = async (params: any) => {
  const response = await axios.post(`/demandReturn/getList`, {...params,condition:{...params}});
  return response;
};

// 获取退款详情
export const getRefundDetail = async (id: number) => {
  const response = await axios.get(`/demandReturn/getDetail`, { params: { id } });
  return response.data;
};

// 删除退款
export const deleteRefund = async (id: number) => {
  const response = await axios.post(`/demandReturn/delete`, { id });
  return response;
};
// 发起退款
export const createRefund = async (params: any) => {
  const response = await axios.post(`/demandReturn/addDemandReturn`, params);
  return response.data;
};

// 退款详情
export const getRefundInfo = async (id: number) => {
  const response = await axios.get(`/demandReturn/getDetail`, { params: { id } });
  return response.data;
};
// 审批详情
export const getRefundApprovalInfo = async (id: number) => {
  const response = await axios.get(`/demandReturn/getProcessAuditRecord`, { params: { id } });
  return response.data;
};